package ace.tool.generate.code.test.core.dao.entity;

import ace.cmp.core.constants.CoreConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;

/**
 * @author caspar
 * @date 2023/3/20 17:33 验证码类别配置
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = "验证码类别配置")
@Table("captcha_item_config")
public class CaptchaItemConfig implements Serializable {
  /**
   * 关联 {@link CaptchaApplicationBizType#getId()}
   */
  @Id private Long id;

  /**
   * 启用
   */
  private Boolean enable;

  /**
   * 启用系统验证
   */
  private Boolean enableSystemCode;

  /**
   * 系统验证
   */
  private String systemCode;

  /**
   * 尝试次数
   */
  private Integer attemptCount;

  /**
   * 过期时间,单位时间-秒
   */
  private Long expireInSeconds;

  /**
   * 删除标志 {@link CoreConstant#DELETE_FLAG_NOT}
   */
  @Schema(title = "删除标志,0-未删除")
  private Long deleteFlag;

  @LastModifiedDate private Long updateTime;
  @CreatedDate private Long createTime;
  @Version private Long rowVersion;
}
